package cn.chengdu.mapper;

import cn.chengdu.entity.People;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 病人表 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-11-13
 */

@Mapper
public interface PeopleMapper extends BaseMapper<People> {

//   注册
    @Insert("insert into hospital_public.people(pname,pphone,pcode,pgender) values(#{pname},#{pphone},#{pcode},'男')")
    public int register(People people);

// 登录
    @Select("select pid,pname,pphone,pcode,pgender from hospital_public.people where pphone=#{pphone}")
    People login(People people);



}
